{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Numerical Methods using Python (scipy)\n",
    "======================================\n",
    "\n",
    "Overview\n",
    "--------\n",
    "\n",
    "The core Python language (including the standard libraries) provide enough functionality to carry out computational research tasks. However, there are dedicated (third-party) Python libraries that provide extended functionality which\n",
    "\n",
    "-   provide numerical tools for frequently occurring tasks\n",
    "\n",
    "-   which are convenient to use\n",
    "\n",
    "-   and are more efficient in terms of CPU time and memory requirements than using the code Python functionality alone.\n",
    "\n",
    "We list three such modules in particular:\n",
    "\n",
    "-   The `numpy` module provides a data type specialised for “number crunching” of vectors and matrices (this is the `array` type provided by “`numpy`” as introduced in [14-numpy.ipynb](14-numpy.ipynb)), and linear algebra tools.\n",
    "\n",
    "-   The `matplotlib` package (also knows as `pylab`) provides plotting and visualisation capabilities (see [15-visualising-data.ipynb](15-visualising-data.ipynb)) and the\n",
    "\n",
    "-   `scipy` package (SCIentific PYthon) which provides a multitude of numerical algorithms and which is introduced in this chapter.\n",
    "\n",
    "Many of the numerical algorithms available through `scipy` and `numpy` are provided by established compiled libraries which are often written in Fortran or C. They will thus execute much faster than pure Python code (which is interpreted). As a rule of thumb, we expect compiled code to be two orders of magnitude faster than pure Python code.\n",
    "\n",
    "You can use the help function for each numerical method to find out more about the source of the implementation.\n",
    "\n",
    "SciPy\n",
    "-----\n",
    "\n",
    "`Scipy` is built on `numpy`. All functionality from `numpy` seems to be available in `scipy` as well. For example, instead of"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "import numpy\n",
    "x = numpy.arange(0, 10, 0.1)\n",
    "y = numpy.sin(x)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "we can therefor also use"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "scrolled": true
   },
   "outputs": [],
   "source": [
    "import scipy as s\n",
    "x = s.arange(0, 10, 0.1)\n",
    "y = s.sin(x)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "First we need to import `scipy`:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "import scipy"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "The `scipy` package provides information about its own structure when we use the help command:\n",
    "\n",
    "```python\n",
    "help(scipy)\n",
    "```"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "The output is very long, so we're showing just a part of it here:\n",
    "\n",
    "    stats       --- Statistical Functions [*]\n",
    "    sparse      --- Sparse matrix [*]\n",
    "    lib         --- Python wrappers to external libraries [*]\n",
    "    linalg      --- Linear algebra routines [*]\n",
    "    signal      --- Signal Processing Tools [*]\n",
    "    misc        --- Various utilities that don't have another home.\n",
    "    interpolate --- Interpolation Tools [*]\n",
    "    optimize    --- Optimization Tools [*]\n",
    "    cluster     --- Vector Quantization / Kmeans [*]\n",
    "    fftpack     --- Discrete Fourier Transform algorithms [*]\n",
    "    io          --- Data input and output [*]\n",
    "    integrate   --- Integration routines [*]\n",
    "    lib.lapack  --- Wrappers to LAPACK library [*]\n",
    "    special     --- Special Functions [*]\n",
    "    lib.blas    --- Wrappers to BLAS library [*]\n",
    "      [*] - using a package requires explicit import (see pkgload)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "If we are looking for an algorithm to integrate a function, we might explore the `integrate` package:"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "```python\n",
    "import scipy.integrate\n",
    "\n",
    "scipy.integrate?\n",
    "```"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "produces:\n",
    "\n",
    "```text\n",
    "=============================================\n",
    "Integration and ODEs (:mod:`scipy.integrate`)\n",
    "=============================================\n",
    "\n",
    ".. currentmodule:: scipy.integrate\n",
    "\n",
    "Integrating functions, given function object\n",
    "============================================\n",
    "\n",
    ".. autosummary::\n",
    "   :toctree: generated/\n",
    "\n",
    "   quad          -- General purpose integration\n",
    "   dblquad       -- General purpose double integration\n",
    "   tplquad       -- General purpose triple integration\n",
    "   nquad         -- General purpose n-dimensional integration\n",
    "   fixed_quad    -- Integrate func(x) using Gaussian quadrature of order n\n",
    "   quadrature    -- Integrate with given tolerance using Gaussian quadrature\n",
    "   romberg       -- Integrate func using Romberg integration\n",
    "   quad_explain  -- Print information for use of quad\n",
    "   newton_cotes  -- Weights and error coefficient for Newton-Cotes integration\n",
    "   IntegrationWarning -- Warning on issues during integration\n",
    "\n",
    "Integrating functions, given fixed samples\n",
    "==========================================\n",
    "\n",
    ".. autosummary::\n",
    "   :toctree: generated/\n",
    "\n",
    "   trapz         -- Use trapezoidal rule to compute integral.\n",
    "   cumtrapz      -- Use trapezoidal rule to cumulatively compute integral.\n",
    "   simps         -- Use Simpson's rule to compute integral from samples.\n",
    "   romb          -- Use Romberg Integration to compute integral from\n",
    "                 -- (2**k + 1) evenly-spaced samples.\n",
    "\n",
    ".. seealso::\n",
    "\n",
    "   :mod:`scipy.special` for orthogonal polynomials (special) for Gaussian\n",
    "   quadrature roots and weights for other weighting factors and regions.\n",
    "\n",
    "Integrators of ODE systems\n",
    "==========================\n",
    "\n",
    ".. autosummary::\n",
    "   :toctree: generated/\n",
    "\n",
    "   odeint        -- General integration of ordinary differential equations.\n",
    "   ode           -- Integrate ODE using VODE and ZVODE routines.\n",
    "   complex_ode   -- Convert a complex-valued ODE to real-valued and integrate.\n",
    "```"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "The following sections show examples which demonstrate how to employ the algorithms provided by `scipy`.\n",
    "\n",
    "Numerical integration\n",
    "---------------------\n",
    "\n",
    "Scientific Python provides a number of integration routines. A general purpose tool to solve integrals *I* of the kind\n",
    "\n",
    "$$I=\\int_a^b f(x) \\mathrm{d} x$$\n",
    "\n",
    "is provided by the `quad()` function of the `scipy.integrate` module.\n",
    "\n",
    "It takes as input arguments the function *f*(*x*) to be integrated (the “integrand”), and the lower and upper limits *a* and *b*. It returns two values (in a tuple): the first one is the computed results and the second one is an estimation of the numerical error of that result.\n",
    "\n",
    "Here is an example: which produces this output:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The numerical result is 17.864264 (+-1.55113e-11)\n"
     ]
    }
   ],
   "source": [
    "# NBVAL_IGNORE_OUTPUT\n",
    "from math import cos, exp, pi\n",
    "from scipy.integrate import quad\n",
    "\n",
    "# function we want to integrate\n",
    "def f(x):\n",
    "    return exp(cos(-2 * x * pi)) + 3.2\n",
    "\n",
    "# call quad to integrate f from -2 to 2\n",
    "res, err = quad(f, -2, 2)\n",
    "\n",
    "print(\"The numerical result is {:f} (+-{:g})\"\n",
    "    .format(res, err))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Note that `quad()` takes optional parameters `epsabs` and `epsrel` to increase or decrease the accuracy of its computation. (Use `help(quad)` to learn more.) The default values are `epsabs=1.5e-8` and `epsrel=1.5e-8`. For the next exercise, the default values are sufficient.\n",
    "\n",
    "### Exercise: integrate a function\n",
    "\n",
    "1.  Using scipy’s `quad` function, write a program that solves the following integral numerically: $I = \\int\n",
    "_0^1\\cos(2\\pi x) dx$.\n",
    "\n",
    "2.  Find the analytical integral and compare it with the numerical solution.\n",
    "\n",
    "3.  Why is it important to have an estimate of the accuracy (or the error) of the numerical integral?"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Exercise: plot before you integrate\n",
    "\n",
    "It is good practice to plot the integrand function to check whether it is “well behaved” before you attempt to integrate. Singularities (i.e. $x$ values where the $f(x)$ tends towards minus or plus infinity) or other irregular behaviour (such as $f(x)=\\sin(\\frac{1}{x}$) close to $x = 0$ are difficult to handle numerically.\n",
    "\n",
    "1.  Write a function with name `plotquad` which takes the same arguments as the quad command (*i.e.* $f$, $a$ and $b$) and which \n",
    "- (i) creates a plot of the integrand $f(x)$ and \n",
    "- (ii) computes the integral numerically using the `quad` function. The return values should be as for the `quad` function."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Solving ordinary differential equations\n",
    "---------------------------------------\n",
    "\n",
    "To solve an ordinary differential equation of the type\n",
    "$$\\frac{\\mathrm{d}y}{\\mathrm{d}t}(t) = f(y,t)$$\n",
    "\n",
    "with a given $y(t_0)=y_0$, we can use `scipy`’s `odeint` function. Here is a (self explaining) example program (`useodeint.py`) to find \n",
    "\n",
    "$$y(t) \\quad \\mathrm{for}\\quad t\\in[0,2]$$\n",
    " given this differential equation:\n",
    "$$\\frac{\\mathrm{d}y}{\\mathrm{d}t}(t) = -2yt \\quad \\mathrm{with} \\quad y(0)=1.$$"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.text.Text at 0x10ef74320>"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYUAAAEKCAYAAAD9xUlFAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xl8VPW9//HXZyY7ZCEkgUCCYVV2kAAiKnprFbRI3bEq\niCuuXW31/tra6+1tvfW2dUMQFXflute6UbVUUdawKnsA2SFhJyRk/f7+SMyNyJJAzpyZ5P18PPIg\nc86ZydvxkDdnvud7jjnnEBERAQj4HUBERMKHSkFERGqpFEREpJZKQUREaqkURESklkpBRERqqRRE\nRKSWSkFERGqpFEREpFaU3wEaKi0tzeXk5PgdQ0QkosyfP3+Hcy79WNtFXCnk5OSQl5fndwwRkYhi\nZuvrs50+PhIRkVoqBRERqaVSEBGRWioFERGppVIQEZFanpWCmU0xswIz++oI683MHjGzfDNbYman\nepVFRETqx8sjhWeB4UdZPwLoW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v8wsmupCeMk59+ZhNvF+P/NiwCTUX1Qf8awFOvJ/\ngyw9D9nmQr49QDO3vs/1OFcHqu8ncfohy1sAiXW+nwkMD2GutvzfPJZBwIaa986z96sh/z+AZKo/\nF24Rives5jVzOPKgacj3rwZkC/k+Vs9cvuxjx8rl4/5lwPPAQ0fZxvP9rEl8fORO4IY+R3puCHP9\nFmgNPG5mABWu+mJXbYC3apZFAS875z4MYa7LgFvNrAIoAUa76r3Ps/erAdkALgb+4Zw7UOfpnr1n\nZvYK1WfLpJnZJuA+ILpOppDvXw3IFvJ9rJ65fNnH6pELQrx/1RgKXAt8aWaLapb9O9WlHrL9TDOa\nRUSkVlMZUxARkUagUhARkVoqBRERqaVSEBGRWioFERGppVIQaQRmlmJmt/mdQ+REqRREGkcKoFKQ\niKdSEGkcDwCda66z/6DfYUSOlyaviTSCmqtavuuc6+VzFJEToiMFERGppVIQEZFaKgWRxrGf6lso\nikQ0lYJII3DV9yj4ouZG7xpoloilgWYREamlIwUREamlUhARkVoqBRERqaVSEBGRWioFERGppVIQ\nEZFaKgUREamlUhARkVr/H51YqRJWBX6IAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x10ce4b4a8>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "%matplotlib inline\n",
    "from scipy.integrate import odeint\n",
    "import numpy as N\n",
    "\n",
    "def f(y, t):\n",
    "    \"\"\"this is the rhs of the ODE to integrate, i.e. dy/dt=f(y,t)\"\"\"\n",
    "    return -2 * y * t\n",
    "\n",
    "y0 = 1             # initial value\n",
    "a = 0              # integration limits for t\n",
    "b = 2\n",
    "\n",
    "t = N.arange(a, b, 0.01)  # values of t for\n",
    "                          # which we require\n",
    "                          # the solution y(t)\n",
    "y = odeint(f, y0, t)  # actual computation of y(t)\n",
    "\n",
    "import pylab          # plotting of results\n",
    "pylab.plot(t, y)\n",
    "pylab.xlabel('t'); pylab.ylabel('y(t)')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "The `odeint` command takes a number of optional parameters to change the default error tolerance of the integration (and to trigger the production of extra debugging output). Use the help command to explore these:\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "collapsed": true
   },
   "source": [
    "```python\n",
    "help(scipy.integrate.odeint)\n",
    "```\n",
    "\n",
    "will show:\n",
    "\n",
    "```\n",
    "Help on function odeint in module scipy.integrate.odepack:\n",
    "\n",
    "odeint(func, y0, t, args=(), Dfun=None, col_deriv=0, full_output=0, ml=None, mu=None, rtol=None, atol=None, tcrit=None, h0=0.0, hmax=0.0, hmin=0.0, ixpr=0, mxstep=0, mxhnil=0, mxordn=12, mxords=5, printmessg=0)\n",
    "    Integrate a system of ordinary differential equations.\n",
    "    \n",
    "    Solve a system of ordinary differential equations using lsoda from the\n",
    "    FORTRAN library odepack.\n",
    "    \n",
    "    Solves the initial value problem for stiff or non-stiff systems\n",
    "    of first order ode-s::\n",
    "    \n",
    "        dy/dt = func(y, t0, ...)\n",
    "    \n",
    "    where y can be a vector.\n",
    "    \n",
    "    *Note*: The first two arguments of ``func(y, t0, ...)`` are in the\n",
    "    opposite order of the arguments in the system definition function used\n",
    "    by the `scipy.integrate.ode` class.\n",
    "    \n",
    "    Parameters\n",
    "    ----------\n",
    "    func : callable(y, t0, ...)\n",
    "        Computes the derivative of y at t0.\n",
    "    y0 : array\n",
    "        Initial condition on y (can be a vector).\n",
    "    t : array\n",
    "        A sequence of time points for which to solve for y.  The initial\n",
    "        value point should be the first element of this sequence.\n",
    "    args : tuple, optional\n",
    "        Extra arguments to pass to function.\n",
    "    Dfun : callable(y, t0, ...)\n",
    "        Gradient (Jacobian) of `func`.\n",
    "    col_deriv : bool, optional\n",
    "        True if `Dfun` defines derivatives down columns (faster),\n",
    "        otherwise `Dfun` should define derivatives across rows.\n",
    "    full_output : bool, optional\n",
    "        True if to return a dictionary of optional outputs as the second output\n",
    "    printmessg : bool, optional\n",
    "        Whether to print the convergence message\n",
    "    \n",
    "    Returns\n",
    "    -------\n",
    "    y : array, shape (len(t), len(y0))\n",
    "        Array containing the value of y for each desired time in t,\n",
    "        with the initial value `y0` in the first row.\n",
    "    infodict : dict, only returned if full_output == True\n",
    "        Dictionary containing additional output information\n",
    "    \n",
    "        =======  ============================================================\n",
    "        key      meaning\n",
    "        =======  ============================================================\n",
    "        'hu'     vector of step sizes successfully used for each time step.\n",
    "        'tcur'   vector with the value of t reached for each time step.\n",
    "                 (will always be at least as large as the input times).\n",
    "        'tolsf'  vector of tolerance scale factors, greater than 1.0,\n",
    "                 computed when a request for too much accuracy was detected.\n",
    "        'tsw'    value of t at the time of the last method switch\n",
    "                 (given for each time step)\n",
    "        'nst'    cumulative number of time steps\n",
    "        'nfe'    cumulative number of function evaluations for each time step\n",
    "        'nje'    cumulative number of jacobian evaluations for each time step\n",
    "        'nqu'    a vector of method orders for each successful step.\n",
    "        'imxer'  index of the component of largest magnitude in the\n",
    "                 weighted local error vector (e / ewt) on an error return, -1\n",
    "                 otherwise.\n",
    "        'lenrw'  the length of the double work array required.\n",
    "        'leniw'  the length of integer work array required.\n",
    "        'mused'  a vector of method indicators for each successful time step:\n",
    "                 1: adams (nonstiff), 2: bdf (stiff)\n",
    "        =======  ============================================================\n",
    "    \n",
    "    Other Parameters\n",
    "    ----------------\n",
    "    ml, mu : int, optional\n",
    "        If either of these are not None or non-negative, then the\n",
    "        Jacobian is assumed to be banded.  These give the number of\n",
    "        lower and upper non-zero diagonals in this banded matrix.\n",
    "        For the banded case, `Dfun` should return a matrix whose\n",
    "        rows contain the non-zero bands (starting with the lowest diagonal).\n",
    "        Thus, the return matrix `jac` from `Dfun` should have shape\n",
    "        ``(ml + mu + 1, len(y0))`` when ``ml >=0`` or ``mu >=0``.\n",
    "        The data in `jac` must be stored such that ``jac[i - j + mu, j]``\n",
    "        holds the derivative of the `i`th equation with respect to the `j`th\n",
    "        state variable.  If `col_deriv` is True, the transpose of this\n",
    "        `jac` must be returned.\n",
    "    rtol, atol : float, optional\n",
    "        The input parameters `rtol` and `atol` determine the error\n",
    "        control performed by the solver.  The solver will control the\n",
    "        vector, e, of estimated local errors in y, according to an\n",
    "        inequality of the form ``max-norm of (e / ewt) <= 1``,\n",
    "        where ewt is a vector of positive error weights computed as\n",
    "        ``ewt = rtol * abs(y) + atol``.\n",
    "        rtol and atol can be either vectors the same length as y or scalars.\n",
    "        Defaults to 1.49012e-8.\n",
    "    tcrit : ndarray, optional\n",
    "        Vector of critical points (e.g. singularities) where integration\n",
    "        care should be taken.\n",
    "    h0 : float, (0: solver-determined), optional\n",
    "        The step size to be attempted on the first step.\n",
    "    hmax : float, (0: solver-determined), optional\n",
    "        The maximum absolute step size allowed.\n",
    "    hmin : float, (0: solver-determined), optional\n",
    "        The minimum absolute step size allowed.\n",
    "    ixpr : bool, optional\n",
    "        Whether to generate extra printing at method switches.\n",
    "    mxstep : int, (0: solver-determined), optional\n",
    "        Maximum number of (internally defined) steps allowed for each\n",
    "        integration point in t.\n",
    "    mxhnil : int, (0: solver-determined), optional\n",
    "        Maximum number of messages printed.\n",
    "    mxordn : int, (0: solver-determined), optional\n",
    "        Maximum order to be allowed for the non-stiff (Adams) method.\n",
    "    mxords : int, (0: solver-determined), optional\n",
    "        Maximum order to be allowed for the stiff (BDF) method.\n",
    "    \n",
    "    See Also\n",
    "    --------\n",
    "    ode : a more object-oriented integrator based on VODE.\n",
    "    quad : for finding the area under a curve.\n",
    "    \n",
    "    Examples\n",
    "    --------\n",
    "    The second order differential equation for the angle `theta` of a\n",
    "    pendulum acted on by gravity with friction can be written::\n",
    "    \n",
    "        theta''(t) + b*theta'(t) + c*sin(theta(t)) = 0\n",
    "    \n",
    "    where `b` and `c` are positive constants, and a prime (') denotes a\n",
    "    derivative.  To solve this equation with `odeint`, we must first convert\n",
    "    it to a system of first order equations.  By defining the angular\n",
    "    velocity ``omega(t) = theta'(t)``, we obtain the system::\n",
    "    \n",
    "        theta'(t) = omega(t)\n",
    "        omega'(t) = -b*omega(t) - c*sin(theta(t))\n",
    "    \n",
    "    Let `y` be the vector [`theta`, `omega`].  We implement this system\n",
    "    in python as:\n",
    "    \n",
    "    >>> def pend(y, t, b, c):\n",
    "    ...     theta, omega = y\n",
    "    ...     dydt = [omega, -b*omega - c*np.sin(theta)]\n",
    "    ...     return dydt\n",
    "    ...\n",
    "    \n",
    "    We assume the constants are `b` = 0.25 and `c` = 5.0:\n",
    "    \n",
    "    >>> b = 0.25\n",
    "    >>> c = 5.0\n",
    "    \n",
    "    For initial conditions, we assume the pendulum is nearly vertical\n",
    "    with `theta(0)` = `pi` - 0.1, and it initially at rest, so\n",
    "    `omega(0)` = 0.  Then the vector of initial conditions is\n",
    "    \n",
    "    >>> y0 = [np.pi - 0.1, 0.0]\n",
    "    \n",
    "    We generate a solution 101 evenly spaced samples in the interval\n",
    "    0 <= `t` <= 10.  So our array of times is:\n",
    "    \n",
    "    >>> t = np.linspace(0, 10, 101)\n",
    "    \n",
    "    Call `odeint` to generate the solution.  To pass the parameters\n",
    "    `b` and `c` to `pend`, we give them to `odeint` using the `args`\n",
    "    argument.\n",
    "    \n",
    "    >>> from scipy.integrate import odeint\n",
    "    >>> sol = odeint(pend, y0, t, args=(b, c))\n",
    "    \n",
    "    The solution is an array with shape (101, 2).  The first column\n",
    "    is `theta(t)`, and the second is `omega(t)`.  The following code\n",
    "    plots both components.\n",
    "    \n",
    "    >>> import matplotlib.pyplot as plt\n",
    "    >>> plt.plot(t, sol[:, 0], 'b', label='theta(t)')\n",
    "    >>> plt.plot(t, sol[:, 1], 'g', label='omega(t)')\n",
    "    >>> plt.legend(loc='best')\n",
    "    >>> plt.xlabel('t')\n",
    "    >>> plt.grid()\n",
    "    >>> plt.show()\n",
    "\n",
    "```"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Exercise: using `odeint`\n",
    "\n",
    "1.  Open a new file with name `testodeint.py` file in a text editor.\n",
    "\n",
    "2.  Write a program that computes the solution *y*(*t*) of this ODE using the `odeint` algorithm:\n",
    "    $$\\frac{\\mathrm{d}y}{\\mathrm{d}t} =  -\\exp(-t)(10\\sin(10t)+\\cos(10t))$$\n",
    "     from $t=0$ to $t = 10$. The initial value is $y(0)=1$.\n",
    "\n",
    "3.  You should display the solution graphically at points $t=0$, $t=0.01$, $t=0.02$, ..., $t=9.99$, $t=10$.\n",
    "\n",
    "Hint: a part of the solution $y(t)$ is shown in the figure below.\n",
    "\n",
    "<img src=\"static/images/odeintsolution8to10.png\" alt=\"image\" style=\"width:100.0%\" />"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Root finding\n",
    "------------\n",
    "\n",
    "If you try to find a $x$ such that\n",
    "$$f(x)=0$$\n",
    "then this is called *root finding*. Note that problems like $g(x)=h(x)$ fall in this category as you can rewrite them as $f(x)=g(x)−h(x)=0$.\n",
    "\n",
    "A number of root finding tools are available in `scipy`’s `optimize` module.\n",
    "\n",
    "### Root finding using the bisection method\n",
    "\n",
    "First we introduce the `bisect` algorithm which is (i) robust and (ii) slow but conceptually very simple.\n",
    "\n",
    "Suppose we need to compute the roots of *f*(*x*)=*x*<sup>3</sup> − 2*x*<sup>2</sup>. This function has a (double) root at *x* = 0 (this is trivial to see) and another root which is located between *x* = 1.5 (where *f*(1.5)= − 1.125) and *x* = 3 (where *f*(3)=9). It is pretty straightforward to see that this other root is located at *x* = 2. Here is a program that determines this root numerically:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The root x is approximately x= 2.00000023842,\n",
      "the error is less than 1e-6.\n",
      "The exact error is -2.38419e-07.\n"
     ]
    }
   ],
   "source": [
    "from scipy.optimize import bisect\n",
    "\n",
    "def f(x):\n",
    "    \"\"\"returns f(x)=x^3-2x^2. Has roots at\n",
    "    x=0 (double root) and x=2\"\"\"\n",
    "    return x ** 3 - 2 * x ** 2\n",
    "\n",
    "# main program starts here\n",
    "x = bisect(f, 1.5, 3, xtol=1e-6)\n",
    "\n",
    "print(\"The root x is approximately x=%14.12g,\\n\"\n",
    "      \"the error is less than 1e-6.\" % (x))\n",
    "print(\"The exact error is %g.\" % (2 - x))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "The `bisect()` method takes three compulsory arguments: (i) the function *f*(*x*), (ii) a lower limit *a* (for which we have chosen 1.5 in our example) and (ii) an upper limit *b* (for which we have chosen 3). The optional parameter `xtol` determines the maximum error of the method.\n",
    "\n",
    "One of the requirements of the bisection method is that the interval \\[*a*, *b*\\] has to be chosen such that the function is either positive at *a* and negative at *b*, or that the function is negative at *a* and postive at *b*. In other words: *a* and *b* have to enclose a root.\n",
    "\n",
    "### Exercise: root finding using the bisect method\n",
    "\n",
    "1.  Write a program with name `sqrttwo.py` to determine an approximation of $\\sqrt{2}$ by finding a root *x* of the function $f(x)=2 − x^2$ using the bisection algorithm. Choose a tolerance for the approximation of the root of 10<sup>−8</sup>.\n",
    "\n",
    "2.  Document your choice of the initial bracket $[a, b]$ for the root: which values have you chosen for *a* and for *b* and why?\n",
    "\n",
    "3.  Study the results:\n",
    "\n",
    "    -   Which value for the root *x* does the bisection algorithm return?\n",
    "\n",
    "    -   Compute the value of $\\\\sqrt{2}$ using `math.sqrt(2)` and compare this with the approximation of the root. How big is the absolute error of *x*? How does this compare with `xtol`?"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Root finding using the `fsolve` funcion\n",
    "\n",
    "A (often) better (in the sense of “more efficient”) algorithm than the bisection algorithm is implemented in the general purpose `fsolve()` function for root finding of (multidimensional) functions. This algorithm needs only one starting point close to the suspected location of the root (but is not garanteed to converge).\n",
    "\n",
    "Here is an example:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The root x is approximately x= 2.000000000000006661\n",
      "The exact error is -6.66134e-15.\n"
     ]
    }
   ],
   "source": [
    "from scipy.optimize import fsolve\n",
    "\n",
    "def f(x):\n",
    "    return x ** 3 - 2 * x ** 2\n",
    "\n",
    "x = fsolve(f, 3)           # one root is at x=2.0\n",
    "\n",
    "print(\"The root x is approximately x=%21.19g\" % x)\n",
    "print(\"The exact error is %g.\" % (2 - x))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "The return value[6] of `fsolve` is a numpy array of length *n* for a root finding problem with *n* variables. In the example above, we have *n* = 1.\n",
    "\n",
    "Interpolation\n",
    "-------------\n",
    "\n",
    "Given a set of *N* points $(x_i, y_i)$ with $i = 1, 2, …N$, we sometimes need a function $\\hat{f}(x)$ which returns $y_i = f(x_i)$ where $x == x_i$, and which in addition provides some interpolation of the data $(x_i, y_i)$ for all $x$.\n",
    "\n",
    "The function `y0 = scipy.interpolate.interp1d(x,y,kind=’nearest’)` does this interpolation based on splines of varying order. Note that the function `interp1d` returns *a function* `y0` which will then interpolate the x-y data for any given $x$ when called as $y0(x)$.\n",
    "\n",
    "The code below demonstrates this, and shows the different interpolation kinds."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.text.Text at 0x112793208>"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXwAAAEKCAYAAAARnO4WAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzs3Xd8VMUWwPHf7GaTbHoFklBC7yU0pYOIhF4EAREElaJU\nQRQUERWlNxHwSRFLRKR3RQUExELovQdIAVKB9LL3/ZEQWkghnZzv57Mfk70z956bxzuZzM49ozRN\nQwghxNNPl98BCCGEyBuS8IUQooiQhC+EEEWEJHwhhCgiJOELIUQ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iYGbgl6ZGkI32dZAiFHw2RtAS4BBy3/b52nr7Z/mx7PTANbJI0\n2Ck8SXuAWduPamepYGv5nncCR8u07bwbQuG/BlZ9dTxd3ouBKfPYl4Bzti/XzjNOtt8Bd4AdtbP0\naAuwt8xnXwS2STpbN9J42H5dnmeBK3RT1fNuCIX/EFgraY2kRcB+4GrlTDHPygXMM8AL2ydr5xkH\nSb9KWlZeL6ZbmPCybqr+2P7D9rTt1XS/49u2D1SO1TtJU2UhApKmgO1ALyvwJr7wbX8CjgE36C7k\n/WX7ed1U/ZJ0AbgHrJM0I+lw7UxjsAU4SDfqe1Ieu2qH6tkK4I6kZ3QDm5u2m1mq2JDfgL8lPQUe\nANdsX+/jRBO/LDMiIr7PxI/wIyLi+6TwIyIakcKPiGhECj8iohEp/IiIRqTwIyIakcKPiGhECj/i\nGyRtlPSs7E0/VfalH+x+NjFs+eNVxAiS/gR+ARYDM7ZPVI4UMScp/IgRyh5ND4F/gc22P1eOFDEn\nmdKJGG05sARYSjfSj5hIGeFHjCDpKt12vWvobrN4rHKkiDlZUDtAxM9M0iHgP9vny/2T/5G0zfbt\n2tkiflRG+BERjcgcfkREI1L4ERGNSOFHRDQihR8R0YgUfkREI1L4ERGNSOFHRDQihR8R0Ygvf0kL\nrZptSz0AAAAASUVORK5CYII=\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x11237e518>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "import numpy as np\n",
    "import scipy.interpolate\n",
    "import pylab\n",
    "\n",
    "def create_data(n):\n",
    "    \"\"\"Given an integer n, returns n data points\n",
    "    x and values y as a numpy.array.\"\"\"\n",
    "    xmax = 5.\n",
    "    x = np.linspace(0, xmax, n)\n",
    "    y = - x**2\n",
    "    #make x-data somewhat irregular\n",
    "    y += 1.5 * np.random.normal(size=len(x))\n",
    "    return x, y\n",
    "\n",
    "#main program\n",
    "n = 10\n",
    "x, y = create_data(n)\n",
    "\n",
    "#use finer and regular mesh for plot\n",
    "xfine = np.linspace(0.1, 4.9, n * 100)\n",
    "#interpolate with piecewise constant function (p=0)\n",
    "y0 = scipy.interpolate.interp1d(x, y, kind='nearest')\n",
    "#interpolate with piecewise linear func (p=1)\n",
    "y1 = scipy.interpolate.interp1d(x, y, kind='linear')\n",
    "#interpolate with piecewise constant func (p=2)\n",
    "y2 = scipy.interpolate.interp1d(x, y, kind='quadratic')\n",
    "\n",
    "pylab.plot(x, y, 'o', label='data point')\n",
    "pylab.plot(xfine, y0(xfine), label='nearest')\n",
    "pylab.plot(xfine, y1(xfine), label='linear')\n",
    "pylab.plot(xfine, y2(xfine), label='cubic')\n",
    "pylab.legend()\n",
    "pylab.xlabel('x')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Curve fitting\n",
    "-------------\n",
    "\n",
    "We have already seen in [the numpy chapter](14-numpy.ipynb) that we can fit polynomial functions through a data set using the `numpy.polyfit` function. Here, we introduce a more generic curve fitting algorithm.\n",
    "\n",
    "Scipy provides a somewhat generic function (based on the Levenburg-Marquardt algorithm )through `scipy.optimize.curve_fit` to fit a given (Python) function to a given data set. The assumption is that we have been given a set of data with points $x_1, x_2, …x_N$ and with corresponding function values $y_i$ and a dependence of $y_i$ on $x_i$ such that $y_i=f(x_i,\\vec{p})$. We want to determine the parameter vector $\\vec{p}=(p_1, p_2, \\ldots,\n",
    "p_k)$ so that $r$, the sum of the residuals, is as small as possible:\n",
    "\n",
    "$$r = \\sum\\limits_{i=1}^N \\left(y_i - f(x_i, \\vec{p})\\right)^2$$\n",
    "\n",
    "Curve fitting is of particular use if the data is noisy: for a given $x_i$ and $y_i=f(x_i,\\vec{p})$ we have a (unknown) error term $\\epsilon_i$ so that $y_i=f(x_i,\\vec{p})+\\epsilon_i$.\n",
    "\n",
    "We use the following example to clarify this:\n",
    "$$f(x,\\vec{p}) = a \\exp(-b x) + c, \\quad\\mathrm{i.e.}\\quad \\vec{p}=\\mathtt{a,b,c}$$"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Optimal parameters are a=2.40487, b=1.2072, and c=0.4703\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "<matplotlib.legend.Legend at 0x1130ecd68>"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAEKCAYAAADpfBXhAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xl8VNX9//HXJ2FChjVCUCGsKiICSkJUChVRq4BrRNtq\n3aptqbZqWystWm1rWystVq1VyheXVuva/qS4VEUt7ltlU0CgKmolokY0rIFs5/fHHSCEmcxkMjP3\nzuT9fDzmMTN3zsz95A587plzz2LOOUREJLfk+R2AiIiknpK7iEgOUnIXEclBSu4iIjlIyV1EJAcp\nuYuI5CAldxGRHBQ3uZtZoZn9x8zeMLPlZnZ1lDJmZjeZ2Ttm9qaZlaUnXBERSUSHBMpsA45yzm0y\nsxDwopk97px7tUmZScDgyO0w4M+RexER8UHc5O68IaybIk9DkVvzYa0nA3dFyr5qZkVm1ts5tzbW\n5xYXF7uBAwcmF7WISDu1cOHCz5xzveKVS6TmjpnlAwuB/YBbnHOvNStSAnzY5PmayLaYyX3gwIEs\nWLAgkd2LiEiEmX2QSLmELqg65xqccyOBvsChZjY8yaCmmNkCM1tQVVWVzEeIiEgCWtVbxjlXDTwD\nTGz2UiXQr8nzvpFtzd8/2zlX7pwr79Ur7q8KERFJUiK9ZXqZWVHkcRg4BljZrNjDwDmRXjOjgfUt\ntbeLiEh6JdLm3hu4M9Lungf83Tn3qJldAOCcmwU8BhwHvANsAc5LU7wikkPq6upYs2YNW7du9TuU\nwCksLKRv376EQqGk3p9Ib5k3gdIo22c1eeyA7ycVgYi0W2vWrKFr164MHDgQM/M7nMBwzrFu3TrW\nrFn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\n4lU4lyxZwsiRI9sUfyxZldx3u2j6fgfY9yjOCD1H59CuQ3XVti6SWypKS9LSzFpWVsbXv/51Dj74\nYCZNmsQhhxwCwMSJE6mvr2fo0KFMmzaN0aNHA9CzZ0/Gjh3L8OHDmTp1asxyzR1wwAF07NiRn/70\npzu2pTO5mzehY+aVl5e71iyzt/1KefOLo38d/TGHvf4DXjnsz1z2xt4aiSqSRVasWMHQoUP9DiMj\nLrroIg455BDOPffcHdu+9a1vceutt5KXF72eHe34mNlC51x5vP1lTZt7rIumU9/sw/Od9+RL1Y/y\n0rR7fYpORCS6d999l+OPP56xY8fuktgBbr/99rTtN2uSe6wr4h+ur4OvnAkv3QQb1kK33hmOTEQk\ntn333ZeVK5svXpd+WdPm3uKApLJzwDXAkrszHJWISDBlTXJv8Up5j31g0BGw6C5obPQpQhGR4Mia\n5B73Svmoc6H6f7B6vq9xiogEQda0uQMtD0g64EToshe89n+w31cyG5iISMBkTc09rg4FcMi34e0n\n4bPoQ4RFRNqL3EnuAKPOg/yO8NosvyMREfFVbiX3Lr3goK/Cknuh5gu/oxER8U1uJXeAwy6Eui2w\nMP4yfCIi4M3qOHToUM4888wd864nsijHj3/8Yw4++GC+853vcMQRR9DQ0NBieYDa2lrGjRtHfX19\nSmKPJfeS+97DYdA4+M9saEjPbGsikltmzpzJU089xT333MPLL78MxE/u7777Li+99BJvvPEGI0eO\nZPLkyeTn58csv11BQQFHH300DzzwQMrijyb3kjvA6O/BhkpY8YjfkYhIwF1wwQWsXr2aSZMmccMN\nN9ClSxcg+opL261atYrx48fzwQcfUFpaym233cbJJ5+84/UjjzySp556CoArr7ySiy++eJf3V1RU\ncM8996T3D3POtXgD+gHPAG8By4EfRCkzHlgPLIncfh7vc0eNGuXSpqHBuRsPdu7Wr6RvHyLSZm+9\n9ZbfITjnnBswYICrqqpyzjnXuXNn55xz7733nhs2bFjM9/zsZz9zt956q9u2bZvba6+9dnntueee\nc0cccYS7++673XHHHefq6+t3eb2+vt4VFxfHjS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SEthZIUUyzczOAeqcc/dGZhl82cyOcs7N9zs2kdZSzV1E\nJAepzV1EJAcpuYuI5CAldxGRHKTkLiKSg5TcRURykJK7iEgOUnIXEclBSu4iIjno/wO7PRq5ak7t\nlQAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x107c85a20>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# NBVAL_IGNORE_OUTPUT\n",
    "import numpy as np\n",
    "from scipy.optimize import curve_fit\n",
    "\n",
    "\n",
    "def f(x, a, b, c):\n",
    "    \"\"\"Fit function y=f(x,p) with parameters p=(a,b,c). \"\"\"\n",
    "    return a * np.exp(- b * x) + c\n",
    "\n",
    "#create fake data\n",
    "x = np.linspace(0, 4, 50)\n",
    "y = f(x, a=2.5, b=1.3, c=0.5)\n",
    "#add noise\n",
    "yi = y + 0.2 * np.random.normal(size=len(x))\n",
    "\n",
    "#call curve fit function\n",
    "popt, pcov = curve_fit(f, x, yi)\n",
    "a, b, c = popt\n",
    "print(\"Optimal parameters are a=%g, b=%g, and c=%g\" % (a, b, c))\n",
    "\n",
    "#plotting\n",
    "import pylab\n",
    "yfitted = f(x, *popt)   # equivalent to f(x, popt[0], popt[1], popt[2])\n",
    "pylab.plot(x, yi, 'o', label='data $y_i$')\n",
    "pylab.plot(x, yfitted, '-', label='fit $f(x_i)$')\n",
    "pylab.xlabel('x')\n",
    "pylab.legend()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Note that in the source code above we define the fitting function $y = f(x)$ through Python code. We can thus fit (nearly) arbitrary functions using the `curve_fit` method.\n",
    "\n",
    "The `curve_fit` function returns a tuple `popt, pcov`. The first entry `popt` contains a tuple of the OPTimal Parameters (in the sense that these minimise equation (\\[eq:1\\]). The second entry contains the covariance matrix for all parameters. The diagonals provide the variance of the parameter estimations.\n",
    "\n",
    "For the curve fitting process to work, the Levenburg-Marquardt algorithm needs to start the fitting process with initial guesses for the final parameters. If these are not specified (as in the example above), the value “1.0“ is used for the initial guess.\n",
    "\n",
    "If the algorithm fails to fit a function to data (even though the function describes the data reasonably), we need to give the algorithm better estimates for the initial parameters. For the example shown above, we could give the estimates to the `curve_fit` function by changing the line\n",
    "\n",
    "```python\n",
    "popt, pcov = curve_fit(f, x, yi)\n",
    "```\n",
    "\n",
    "to\n",
    "\n",
    "```python\n",
    "popt, pcov = curve_fit(f, x, yi, p0=(2,1,0.6))\n",
    "```"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "if our initial guesses would be *a* = 2, *b* = 1 and *c* = 0.6. Once we take the algorithm “roughly in the right area” in parameter space, the fitting usually works well.\n",
    "\n",
    "Fourier transforms\n",
    "------------------\n",
    "\n",
    "In the next example, we create a signal as a superposition of a 50 Hz and 70 Hz sine wave (with a slight phase shift between them). We then Fourier transform the signal and plot the absolute value of the (complex) discrete Fourier transform coefficients against frequency, and expect to see peaks at 50Hz and 70Hz."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.text.Text at 0x1134160f0>"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYgAAAEKCAYAAAAIO8L1AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzsvWmUJUd5JvzE3deq6u7qvdXdEhJoQwipJWSQsQQ2xiB2\nRoAxg218ZHvwMt4G+OyD7cF4+OzPjG02gwEbYzNgBjAYxGKBMAgkpG6hfW0tvVZ1V1d11d1v3rwZ\n34/IyIzMjMybeevGrS2ec3TUXXWrMp7OzHd53jfeIJRSaGhoaGho+JFa6QVoaGhoaKxOaAehoaGh\noSGFdhAaGhoaGlJoB6GhoaGhIYV2EBoaGhoaUmgHoaGhoaEhhXYQGhoaGhpSaAehoaGhoSHFqnIQ\n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bjui0iLqjsVGo2uf3vAe9FxPUN3s+s\nJhcQ1s7eyW0LuDAi7slfkF+msYZePmiGHVN1r9kRsa7qXseR1RwqdtDP/7GIeFHSq5JOIJuJ8+x+\n0tIQSScCZ5AVfGaD4j4I6xT3AN9M0yYj6RNpltslZE023Wl2zONzP7Me+FTanl11rwvTLJtIOnoP\nz/4HMCPNrImk8blz84GbgT+kWsyASZoCXA+ckas5mQ2YCwjrFPPJ+heWSVoF3ED21/0dZLOArgF+\nB/w99zPfB66RtJSsNlBxOTASWClpddqvK/UrzAFul7QCuC13ugfYh8abl/pzLtnMpnemjuq7Crin\ndTDP5mqWk4aD/iUi/jhEz5tGNoz1s3XOzwPeHsww13SfGxnCuKw9uAZh1iSS5pKtEnZpP5e9Dcyp\nvCg3wOcsAj5HNprKrGGuQZiZWU2uQZiZWU0uIMzMrCYXEGZmVpMLCDMzq8kFhJmZ1eQCwszMavo/\nx/0hm/KmAgQAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x113366668>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "import scipy\n",
    "import matplotlib.pyplot as plt\n",
    "pi = scipy.pi\n",
    "\n",
    "signal_length = 0.5   #[seconds]\n",
    "sample_rate=500       #sampling rate [Hz]\n",
    "dt = 1./sample_rate   #time between two samples [s]\n",
    "\n",
    "df = 1/signal_length  #frequency between points in\n",
    "                      #in frequency domain [Hz] \n",
    "t=scipy.arange(0,signal_length,dt) #the time vector\n",
    "n_t=len(t)            #length of time vector\n",
    "\n",
    "#create signal\n",
    "y=scipy.sin(2*pi*50*t)+scipy.sin(2*pi*70*t+pi/4)\n",
    "\n",
    "#compute fourier transform\n",
    "f=scipy.fft(y)\n",
    "\n",
    "#work out meaningful frequencies in fourier transform\n",
    "freqs=df*scipy.arange(0,(n_t-1)/2.,dtype='d') #d=double precision float\n",
    "n_freq=len(freqs)\n",
    "\n",
    "#plot input data y against time\n",
    "plt.subplot(2,1,1)\n",
    "plt.plot(t,y,label='input data')\n",
    "plt.xlabel('time [s]')\n",
    "plt.ylabel('signal')\n",
    "\n",
    "#plot frequency spectrum \n",
    "plt.subplot(2,1,2)\n",
    "plt.plot(freqs,abs(f[0:n_freq]),\n",
    "         label='abs(fourier transform)')\n",
    "plt.xlabel('frequency [Hz]')\n",
    "plt.ylabel('abs(DFT(signal))')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "The lower plot shows the discrete Fourier transform computed from the data shown in the upper plot."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Optimisation\n",
    "------------\n",
    "\n",
    "Often we need to find the maximum or minimum of a particular function *f*(*x*) where *f* is a scalar function but *x* could be a vector. Typical applications are the minimisation of entities such as cost, risk and error, or the maximisation of productivity, efficiency and profit. Optimisation routines typically provide a method to minimise a given function: if we need to maximise *f*(*x*) we create a new function *g*(*x*) that reverses the sign of *f*, i.e. *g*(*x*)= − *f*(*x*) and we minimise *g*(*x*).\n",
    "\n",
    "Below, we provide an example showing (i) the definition of the test function and (ii) the call of the `scipy.optimize.fmin` function which takes as argument a function *f* to minimise and an initial value *x*<sub>0</sub> from which to start the search for the minimum, and which returns the value of *x* for which *f*(*x*) is (locally) minimised. Typically, the search for the minimum is a local search, i.e. the algorithm follows the local gradient. We repeat the search for the minimum for two values (*x*<sub>0</sub> = 1.0 and *x*<sub>0</sub> = 2.0, respectively) to demonstrate that depending on the starting value we may find different minimar of the function *f*.\n",
    "\n",
    "The majority of the commands (after the two calls to `fmin`) in the file `fmin1.py` creates the plot of the function, the start points for the searches and the minima obtained:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Optimization terminated successfully.\n",
      "         Current function value: -2.023866\n",
      "         Iterations: 16\n",
      "         Function evaluations: 32\n",
      "Start search at x=1., minimum is [ 0.23964844]\n",
      "Optimization terminated successfully.\n",
      "         Current function value: -1.000529\n",
      "         Iterations: 16\n",
      "         Function evaluations: 32\n",
      "Start search at x=2., minimum is [ 3.13847656]\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "<matplotlib.legend.Legend at 0x1135b3b70>"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYAAAAEKCAYAAAAb7IIBAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XlcVXX++PHX57JvgooiiwjuIqgoueeSS5Ytans0qU05\nNS3f6VtmjdVsOdN3xmn6NVOZTaVOlrZYOWZupaVJbqgobikCIooCyo7A5fP7A0RUkOXu976fjweP\nuIdzz+d9T9fzPuezKq01QgghXI/B1gEIIYSwDUkAQgjhoiQBCCGEi5IEIIQQLkoSgBBCuChJAEII\n4aLMkgCUUpOUUoeVUkeVUs838PcxSqkCpdSe2p+XzVGuEEKI1nM39QBKKTfgTWACkAXsUEqt1Fof\nuGLXzVrrW0wtTwghhHmY4wlgMHBUa52mta4AlgG3m+G4QgghLMjkJwAgHDhR73UWMKSB/YYrpVKA\nk8CzWuvUhg6mlJoFzALw8fEZ1LlzZzOE2HrV1dUYDNJUAnIu6pNzcYmci0vs4VwcOXIkV2vdoTn7\nmiMBNEcyEKm1LlZK3Qx8CfRoaEet9UJgIUBCQoLeuXOnlUJs2KZNmxgzZoxNY7AXci4ukXNxiZyL\nS+zhXCilMpq7rzlS1Umg/m16RO22OlrrQq11ce3vqwEPpVSwGcoWQgjRSuZIADuAHkqpaKWUJ3Av\nsLL+DkqpTkopVfv74Npy88xQthBCiFYyuQpIa12llHoCWAu4Ae9rrVOVUo/W/n0BcCfwmFKqCigD\n7tUyDakQQtiUWdoAaqt1Vl+xbUG93/8F/MscZQkhhDAPaboXQggXJQlACCFclCQAIYRwUZIAhBDC\nRUkCEEIIFyUJQAghXJQkACGEcFGSAIQQwkVJA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nuGNN97Aw8Oj0fddlJWVRefONbOCu7m5XVXuK6+8wuOPP1732tvbm5ycHP76\n179SUFDAtm3bWnUOmhIbHkhGXikFZU0nMVvbmX6OQB8Pundw/EV5hH1wuIFgzuL9999n2rRpDV4M\nL/L09GTcuHEsX76cxFYM9ffy8uK7777D39+fyspKRo4cyU033cTQoUMbfU9cXByrVq26anthYSGB\ngTWNpsXFxaSlpeHu7l63+lFj77soIiKCrKwsBgwYQHV1dd12rTXPP/88N910EwMHDqzb3rZtWwoL\nC3n++edb/LlbIja85jOlZhcw3M6XVtyRns91UW1lSVBhNvIE0EpLliyhX79+9O/fn1/84hcAvPba\na8TGxhIbG8vrr78O1NR9T548mf79+xMbG1tXzbF06VJuv/32uuONHTuW9evXA/Diiy/y5JNPAjVV\nJEtbudiHUqruAl1ZWUllZeVl/eePHz/O7bffTkJCAoMHD+bw4cONHqtHjx5kZmZSVVXFU089xSuv\nvMKAAQPYtGlTs2KZNm0an3/+OY899hi33norSUlJvPXWW/zzn/9kw4YNfPbZZ3X1/gAnT54k0goz\nXDrK2gC5xRdIyy2R/v/CrBz6CeAP/03lQLZ5/+HGhLXhd7f2veY+qampvPLKK2zdupXg4GDy8/PZ\ntWsXH3zwAdu2bUNrzZAhQxg9ejRpaWmEhYXx9ddfA1BQUEBFRQVpaWlERUVd+ix/+AMvv/wyZ86c\nYffu3XX15LGxsezYsaPVn8doNDJo0CCOHj3K448/zpAhQ4CahPDwww+zcOFCunXrxurVq3n11Vf5\n4IMPGjxOQkICCxYswN3dnfffr1l0e/bs2c2Ow8/P76pjDxs2DICnnnrqsu3FxcW0adMGLy+vZh+/\ntdr7exEW6G33DcE7088B0v9fmJc8AbTCd999x1133UVwcE2VQbt27diyZQtTp07Fz88Pf39/pk2b\nxubNm4mLi2P9+vXMmTOHzZs3ExgYSG5uLkFBQZcdc9SoUWitee2111i2bFld1ZCbmxuenp4UFRVd\ntv/48ePrnjbq/3z11eUrdbq5ubFnzx6ysrLYvn07+/fvB2p636S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zrqcdkIp5U5Nw/c4ai78O4D7tdapNg3MBlTN3dBiIF9r/Rtbx2Mv\nap8AntVa32LrWJpD2gBES/0LCADWK6X2KKUW2Doga6lt/H4CWEtNo+cnrnjxrzUC+AVwQ+33YE/t\nHbBwIPIEIIQQLkqeAIQQwkVJAhBCCBclCUAIIVyUJAAhhHBRkgCEEMJFSQIQQggXJQlACCFclCQA\nIZpJKXVd7ToI3kopv9p58GNtHZcQrSUDwYRoAaXUK9TM9+IDZGmt/2LjkIRoNUkAQrSAUsqTmjmA\nyoHhWmujjUMSotWkCkiIlmkP+FMzH5K3jWMRwiTyBCBECyilVlKzElg0EKq1fsLGIQnRarIegBDN\npJR6EKjUWn9Uuz7wVqXUDVrr72wdmxCtIU8AQgjhoqQNQAghXJQkACGEcFGSAIQQwkVJAhBCCBcl\nCUAIIVyUJAAhhHBRkgCEEMJF/X8flwhPZchumwAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x11346a470>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "from scipy import arange, cos, exp\n",
    "from scipy.optimize import fmin\n",
    "import pylab\n",
    "\n",
    "def f(x):\n",
    "    return cos(x) - 3 * exp( -(x - 0.2) ** 2)\n",
    "\n",
    "# find minima of f(x),\n",
    "# starting from 1.0 and 2.0 respectively\n",
    "minimum1 = fmin(f, 1.0)\n",
    "print(\"Start search at x=1., minimum is\", minimum1)\n",
    "minimum2 = fmin(f, 2.0)\n",
    "print(\"Start search at x=2., minimum is\", minimum2)\n",
    "\n",
    "# plot function\n",
    "x = arange(-10, 10, 0.1)\n",
    "y = f(x)\n",
    "pylab.plot(x, y, label='$\\cos(x)-3e^{-(x-0.2)^2}$')\n",
    "pylab.xlabel('x')\n",
    "pylab.grid()\n",
    "pylab.axis([-5, 5, -2.2, 0.5])\n",
    "\n",
    "# add minimum1 to plot\n",
    "pylab.plot(minimum1, f(minimum1), 'vr',\n",
    "           label='minimum 1')\n",
    "# add start1 to plot\n",
    "pylab.plot(1.0, f(1.0), 'or', label='start 1')\n",
    "\n",
    "# add minimum2 to plot\n",
    "pylab.plot(minimum2,f(minimum2),'vg',\\\n",
    "           label='minimum 2')\n",
    "# add start2 to plot\n",
    "pylab.plot(2.0,f(2.0),'og',label='start 2')\n",
    "\n",
    "pylab.legend(loc='lower left')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Calling the `fmin` function will produce some diagnostic output, which you can also see above.\n",
    "\n",
    "##### Return value of `fmin`\n",
    "\n",
    "Note that the return value from the `fmin` function is a numpy `array` which – for the example above – contains only one number as we have only one parameter (here *x*) to vary. In general, `fmin` can be used to find the minimum in a higher-dimensional parameter space if there are several parameters. In that case, the numpy array would contain those parameters that minimise the objective function. The objective function $f(x)$ has to return a scalar even if there are more parameters, i.e. even if $x$ is a vector as in $f(\\mathbf{x})$."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Other numerical methods\n",
    "-----------------------\n",
    "\n",
    "Scientific Python and Numpy provide access to a large number of other numerical algorithms including function interpolation, Fourier transforms, optimisation, special functions (such as Bessel functions), signal processing and filters, random number generation, and more. Start to explore `scipy`’s and `numpy`’s capabilities using the `help` function and the documentation provided on the web."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "scipy.io: Scipy-input output\n",
    "----------------------------\n",
    "\n",
    "Scipy provides routines to read and write Matlab `mat` files. Here is an example where we create a Matlab compatible file storing a (1x11) matrix, and then read this data into a numpy array from Python using the scipy Input-Output library:\n",
    "\n",
    "First we create a mat file in Octave (Octave is \\[mostly\\] compatible with Matlab):\n",
    "\n",
    "```octave\n",
    "octave:1> a=-1:0.5:4\n",
    "a =\n",
    "Columns 1 through 6:\n",
    "   -1.0000   -0.5000    0.0000    0.5000    1.0000    1.5000    \n",
    "Columns 7 through 11:\n",
    "   2.0000    2.5000   3.0000    3.5000    4.0000\n",
    "octave:2> save -6 octave_a.mat a       %save as version 6\n",
    "```"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Then we load this array within python:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [],
   "source": [
    "from scipy.io import loadmat\n",
    "mat_contents = loadmat('static/data/octave_a.mat')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'__globals__': [],\n",
       " '__header__': b'MATLAB 5.0 MAT-file Platform: posix, Created on: Mon Aug  8 12:21:36 2016',\n",
       " '__version__': '1.0',\n",
       " 'a': array([[-1. , -0.5,  0. ,  0.5,  1. ,  1.5,  2. ,  2.5,  3. ,  3.5,  4. ]])}"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "mat_contents"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[-1. , -0.5,  0. ,  0.5,  1. ,  1.5,  2. ,  2.5,  3. ,  3.5,  4. ]])"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "mat_contents['a']"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "The function `loadmat` returns a dictionary: the key for each item in the dictionary is a string which is the name of that array when it was saved in Matlab. The key is the actual array.\n",
    "\n",
    "A Matlab matrix file can hold several arrays. Each of those is presented by one key-value pair in the dictionary.\n",
    "\n",
    "Let’s save two arrays from Python to demonstrate that:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "import scipy.io\n",
    "import numpy as np\n",
    "\n",
    "# create two numpy arrays\n",
    "a = np.linspace(0, 50, 11)\n",
    "b = np.ones((4, 4))\n",
    "\n",
    "# save as mat-file\n",
    "# create dictionary for savemat\n",
    "tmp_d = {'a': a,\n",
    "         'b': b}\n",
    "scipy.io.savemat('data.mat', tmp_d)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "This program creates the file `data.mat`, which we can subsequently read using Matlab or here Octave:\n",
    "\n",
    "    HAL47:code fangohr$ octave\n",
    "    GNU Octave, version 3.2.4\n",
    "    Copyright (C) 2009 John W. Eaton and others.\n",
    "    <snip>\n",
    "\n",
    "    octave:1> whos\n",
    "    Variables in the current scope:\n",
    "\n",
    "      Attr Name        Size                     Bytes  Class\n",
    "      ==== ====        ====                     =====  ===== \n",
    "           ans         1x11                        92  cell\n",
    "\n",
    "    Total is 11 elements using 92 bytes\n",
    "\n",
    "    octave:2> load data.mat\n",
    "    octave:3> whos\n",
    "    Variables in the current scope:\n",
    "\n",
    "      Attr Name        Size                     Bytes  Class\n",
    "      ==== ====        ====                     =====  ===== \n",
    "           a          11x1                         88  double\n",
    "           ans         1x11                        92  cell\n",
    "           b           4x4                        128  double\n",
    "\n",
    "    Total is 38 elements using 308 bytes\n",
    "\n",
    "    octave:4> a\n",
    "    a =\n",
    "\n",
    "        0\n",
    "        5\n",
    "       10\n",
    "       15\n",
    "       20\n",
    "       25\n",
    "       30\n",
    "       35\n",
    "       40\n",
    "       45\n",
    "       50\n",
    "\n",
    "    octave:5> b\n",
    "    b =\n",
    "\n",
    "       1   1   1   1\n",
    "       1   1   1   1\n",
    "       1   1   1   1\n",
    "       1   1   1   1"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Note that there are other functions to read from and write to in formats as used by IDL, Netcdf and other formats in `scipy.io`.\n",
    "\n",
    "More → see [Scipy tutorial](http://docs.scipy.org/doc/scipy/reference/tutorial/io.html)."
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.0"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 1
}
